package com.rs.game.player;

import java.util.TimerTask;

import com.rs.cores.CoresManager;

public class TimeOnline {

	private transient Player player;
	
	public TimeOnline(Player player) {
		this.player = player;
	}
	
	public void startTimer() {
	CoresManager.fastExecutor.schedule(new TimerTask() {
			int timer = 1800;
			@Override
			public void run() {
				if (timer == 1) {
					player.time +=1;
					timer = 1800;
				}
				if (timer > 0) {
					timer--;
				}
			}
		}, 0L, 1000L);
	}
}
